import java.util.Scanner;
public class CountNum {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int odd = 0;
        int even = 0;
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            if(arr[i]%2 == 0 || arr[i] == 0) {
                odd++;
            }else {
                even++;
            }
        }
        System.out.print(even+" "+odd);
    }
}
